<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TColor类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_t_color-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TColor类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ac5fffc6c7146ad1ca1152832be51acf1"><td class="memItemLeft" align="right" valign="top"><a id="ac5fffc6c7146ad1ca1152832be51acf1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TColor</b> (color_t *nativeObj)</td></tr>
<tr class="separator:ac5fffc6c7146ad1ca1152832be51acf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe32dea0394c1e70ab9d256508ab350a"><td class="memItemLeft" align="right" valign="top"><a id="afe32dea0394c1e70ab9d256508ab350a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TColor</b> (const color_t *nativeObj)</td></tr>
<tr class="separator:afe32dea0394c1e70ab9d256508ab350a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3a8c4dbabe791570d46009fa7200cac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t_color.html">TColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#ad3a8c4dbabe791570d46009fa7200cac">FromStr</a> (const char *str)</td></tr>
<tr class="separator:ad3a8c4dbabe791570d46009fa7200cac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8104e48b26a70e7805af11bedb69d9d"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#ad8104e48b26a70e7805af11bedb69d9d">R</a> ()</td></tr>
<tr class="separator:ad8104e48b26a70e7805af11bedb69d9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75df9503f2cb7d8717ea806c6b46db41"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#a75df9503f2cb7d8717ea806c6b46db41">G</a> ()</td></tr>
<tr class="separator:a75df9503f2cb7d8717ea806c6b46db41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1543abd97237855d94fba67723abcedd"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#a1543abd97237855d94fba67723abcedd">B</a> ()</td></tr>
<tr class="separator:a1543abd97237855d94fba67723abcedd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59591521013dc2caa7ec2993e4c28247"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#a59591521013dc2caa7ec2993e4c28247">A</a> ()</td></tr>
<tr class="separator:a59591521013dc2caa7ec2993e4c28247"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c78a9c3d7a14b19af0485054eaa1f58"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#a6c78a9c3d7a14b19af0485054eaa1f58">Destroy</a> ()</td></tr>
<tr class="separator:a6c78a9c3d7a14b19af0485054eaa1f58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3df039b0af0aebffd74520cad34d82be"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#a3df039b0af0aebffd74520cad34d82be">GetColor</a> () const</td></tr>
<tr class="separator:a3df039b0af0aebffd74520cad34d82be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a6c04b6a2e72cfdbe0a0edab46d7ef080"><td class="memItemLeft" align="right" valign="top"><a id="a6c04b6a2e72cfdbe0a0edab46d7ef080"></a>
static <a class="el" href="class_t_color.html">TColor</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (color_t *nativeObj)</td></tr>
<tr class="separator:a6c04b6a2e72cfdbe0a0edab46d7ef080"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7533b23ca5cebf485793c319753d7655"><td class="memItemLeft" align="right" valign="top"><a id="a7533b23ca5cebf485793c319753d7655"></a>
static <a class="el" href="class_t_color.html">TColor</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const color_t *nativeObj)</td></tr>
<tr class="separator:a7533b23ca5cebf485793c319753d7655"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cb55a218535c874b70c80348ef0e13f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_t_color.html">TColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_color.html#a4cb55a218535c874b70c80348ef0e13f">Create</a> (uint8_t r, uint8_t b, uint8_t g, uint8_t a)</td></tr>
<tr class="separator:a4cb55a218535c874b70c80348ef0e13f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a5ec1633bea7e79bb77908e70410d049c"><td class="memItemLeft" align="right" valign="top"><a id="a5ec1633bea7e79bb77908e70410d049c"></a>
color_t *&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a5ec1633bea7e79bb77908e70410d049c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>颜色。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a59591521013dc2caa7ec2993e4c28247"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59591521013dc2caa7ec2993e4c28247">&#9670;&nbsp;</a></span>A()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TColor::A </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取alpha通道的值。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回alpha通道的值。 </dd></dl>

</div>
</div>
<a id="a1543abd97237855d94fba67723abcedd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1543abd97237855d94fba67723abcedd">&#9670;&nbsp;</a></span>B()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TColor::B </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取蓝色通道的值。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回蓝色通道的值。 </dd></dl>

</div>
</div>
<a id="a4cb55a218535c874b70c80348ef0e13f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4cb55a218535c874b70c80348ef0e13f">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t_color.html">TColor</a> TColor::Create </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建color对象。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>红色通道。 </td></tr>
    <tr><td class="paramname">b</td><td>蓝色通道。 </td></tr>
    <tr><td class="paramname">g</td><td>绿色通道。 </td></tr>
    <tr><td class="paramname">a</td><td>alpha通道。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>color对象。 </dd></dl>

</div>
</div>
<a id="a6c78a9c3d7a14b19af0485054eaa1f58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c78a9c3d7a14b19af0485054eaa1f58">&#9670;&nbsp;</a></span>Destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TColor::Destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>销毁color对象。 </p><blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ad3a8c4dbabe791570d46009fa7200cac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3a8c4dbabe791570d46009fa7200cac">&#9670;&nbsp;</a></span>FromStr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t_color.html">TColor</a> TColor::FromStr </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建color对象。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>css类似的颜色值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>color对象。 </dd></dl>

</div>
</div>
<a id="a75df9503f2cb7d8717ea806c6b46db41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75df9503f2cb7d8717ea806c6b46db41">&#9670;&nbsp;</a></span>G()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TColor::G </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取绿色通道的值。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回绿色通道的值。 </dd></dl>

</div>
</div>
<a id="a3df039b0af0aebffd74520cad34d82be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3df039b0af0aebffd74520cad34d82be">&#9670;&nbsp;</a></span>GetColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TColor::GetColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>颜色的数值。 </p>

</div>
</div>
<a id="ad8104e48b26a70e7805af11bedb69d9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8104e48b26a70e7805af11bedb69d9d">&#9670;&nbsp;</a></span>R()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TColor::R </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取红色通道的值。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回红色通道的值。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
